package com.link.base.base.questionsurvey.dao.mybatis.mapper;

import com.link.base.base.user.model.User;
import com.link.base.base.questionsurvey.model.*;
import com.link.core.basic.dao.mapper.BasicMapper;
import com.link.base.base.questionsurvey.model.*;

import java.util.List;

/**
 * @author unknown
 * @date unknown
 * @comments 问卷
 */
public interface QuestionMapper extends BasicMapper<Question> {

    /**
     * 查询所有作答用户
     *
     * @param entity 作答用户
     * @return 用户列表
     * @throws Exception
     */
    public List<User> queryUserFillInPage(User entity) throws Exception;

    /**
     * 分页查询问卷列表
     * @param entity 问卷
     * @return 问卷列表
     * @throws Exception
     */
    public List<Question> queryQuestionSurveyPage(Question entity) throws Exception;

    /**
     * 发布出去的问卷列表
     * @param entity 问卷
     * @return 问卷列表
     * @throws Exception
     */
    public List<Question> queryQuestionByUserPage(Question entity) throws Exception;

    /**
     * 根据Id查询调查问卷信息
     *
     * @param entity 问卷
     * @return 问卷
     * @throws Exception
     */
    public Question queryQuestionById(Question entity) throws Exception;

    /**
     * 查询问题列表
     * @param entity 问卷
     * @return 问卷列表
     * @throws Exception
     */
    public List<QuestionItem> queryQuestionItemPage(QuestionItem entity) throws Exception;

    /**
     * 查询选项明细
     * @param qu 问卷
     * @return 问卷列表
     * @throws Exception
     */
    public List<QuestionOption> queryQuestionOptionPage(QuestionOption qu) throws Exception;

    /**
     * 查询问题明细
     * @param qu 问卷问题
     * @return 问卷列表
     * @throws Exception
     */
    public List<QuestionItemReport> queryquestionItemReport(QuestionItem qu) throws Exception;


    /**
     * 查询订单列表总记录数
     * @param qu 问卷
     * @return int
     * @throws Exception
     */
    public int queryCountQuestion(Question qu) throws Exception;

    /**
     * 查询问卷明细
     * @param qu 问卷
     * @return 问卷
     * @throws Exception
     */
    public Question queryQuestionItem(Question qu) throws Exception;

    /**
     * 新建标题
     * @param qu 问卷
     * @throws Exception
     */
    public void questionTitleInsert(Question qu) throws Exception;

    /**
     * 新建问题
     * @param record 问卷
     * @throws Exception
     */
    public void questionItemInsert(QuestionItem record) throws Exception;

    /**
     * 新建选项
     * @param record 问卷
     * @throws Exception
     */
    public void questionOptionInsert(QuestionOption record) throws Exception;


    /**
     * 答案添加
     * @param record 问卷
     * @throws Exception
     */
    public void answerInsert(QuestionAnswer record) throws Exception;


    /**
     * 答案添加
     * @param record 问卷
     * @throws Exception
     */
    public void answerItemInsert(QuestionAnwserItem record) throws Exception;


    /**
     * 答案添加
     * @param record 问卷
     * @throws Exception
     */
    public void answerItemDetailInsert(QuestionAnswerDetail record) throws Exception;


}


